home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2001 May / may_2001.iso / intercd / root / Multimedia / ^DivX_Article / virtualdub / VirtualDub-source-1_4d / gui.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-03-20  |  2.7 KB  |  84 lines

  1. //    VirtualDub - Video processing and capture application
  2. //    Copyright (C) 1998-2001 Avery Lee
  3. //
  4. //    This program is free software; you can redistribute it and/or modify
  5. //    it under the terms of the GNU General Public License as published by
  6. //    the Free Software Foundation; either version 2 of the License, or
  7. //    (at your option) any later version.
  8. //
  9. //    This program is distributed in the hope that it will be useful,
  10. //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. //    GNU General Public License for more details.
  13. //
  14. //    You should have received a copy of the GNU General Public License
  15. //    along with this program; if not, write to the Free Software
  16. //    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #ifndef f_GUI_H
  19. #define f_GUI_H
  20.  
  21. #include <windows.h>
  22. #include "list.h"
  23.  
  24. #define IDC_CAPTURE_WINDOW        (500)
  25. #define IDC_STATUS_WINDOW        (501)
  26. #define IDC_POSITION            (502)
  27.  
  28. class ModelessDlgNode : public ListNode2<ModelessDlgNode> {
  29. public:
  30.     HWND hdlg;
  31.  
  32.     ModelessDlgNode() {}
  33.     ModelessDlgNode(HWND _hdlg) : hdlg(_hdlg) {}
  34. };
  35.  
  36. void guiOpenDebug();
  37.  
  38. void guiDlgMessageLoop(HWND hDlg);
  39. bool guiCheckDialogs(LPMSG pMsg);
  40. void guiAddModelessDialog(ModelessDlgNode *pmdn);
  41.  
  42. void guiRedoWindows(HWND hWnd);
  43. void guiSetStatus(char *format, int nPart, ...);
  44. void guiSetTitle(HWND hWnd, UINT uID, ...);
  45. void guiMenuHelp(HWND hwnd, WPARAM wParam, WPARAM part, UINT *iTranslator);
  46. void guiOffsetDlgItem(HWND hdlg, UINT id, LONG xDelta, LONG yDelta);
  47. void guiResizeDlgItem(HWND hdlg, UINT id, LONG x, LONG y, LONG dx, LONG dy);
  48. void guiSubclassWindow(HWND hwnd, WNDPROC newproc);
  49.  
  50. void guiPositionInitFromStream(HWND hWndPosition);
  51. LONG guiPositionHandleCommand(WPARAM wParam, LPARAM lParam);
  52. LONG guiPositionHandleNotify(WPARAM wParam, LPARAM lParam);
  53. void guiPositionBlit(HWND hWndClipping, LONG lFrame, int w=0, int h=0);
  54.  
  55. bool guiChooseColor(HWND hwnd, COLORREF& rgbOld);
  56.  
  57.  
  58. enum {
  59.     REPOS_NOMOVE        = 0,
  60.     REPOS_MOVERIGHT        = 1,
  61.     REPOS_MOVEDOWN        = 2,
  62.     REPOS_SIZERIGHT        = 4,
  63.     REPOS_SIZEDOWN        = 8
  64. };
  65.  
  66. struct ReposItem {
  67.     UINT uiCtlID;
  68.     int fReposOpts;
  69. };
  70.  
  71. void guiReposInit(HWND hwnd, struct ReposItem *lpri, POINT *lppt);
  72. void guiReposResize(HWND hwnd, struct ReposItem *lpri, POINT *lppt);
  73.  
  74. void guiDeferWindowPos(HDWP hdwp, HWND hwnd, HWND hwndInsertAfter, int x, int y, int dx, int dy, UINT flags);
  75. void guiEndDeferWindowPos(HDWP hdwp);
  76. int guiMessageBoxF(HWND hwnd, LPCTSTR lpCaption, UINT uType, const char *format, ...);
  77.  
  78. void ticks_to_str(char *dst, DWORD ticks);
  79. void size_to_str(char *dst, __int64 i64Bytes);
  80.  
  81. int guiListboxInsertSortedString(HWND, const char *);
  82.  
  83. #endif
  84.